package client.model;

import client.GUI.GuiFrame;
import client.controller.ClientController;
import com.esotericsoftware.kryonet.Connection;
import com.esotericsoftware.kryonet.Listener;

public class ClientListener extends Listener {

    private GuiFrame gui;
    long l;
    
    public ClientListener(GuiFrame gui) {
        super();
        this.gui = gui;
    }

    @Override
    public void connected(Connection connection) {
        l = System.nanoTime();
        System.out.println("Client> connected");
    }

    @Override
    public void disconnected(Connection connection) {
        System.out.println("Client> disconnected");
    }

    @Override
    public void received(Connection connection, Object object) {
        System.out.println("Client> received something");
        if (object instanceof network.data.respone.DolaczenieSieDoGry) {
        } else if (object instanceof network.data.respone.GotowyNaStart) {
        } else if (object instanceof network.data.respone.ListaPokojow) {
        } else if (object instanceof network.data.respone.OdnowienieHasla) {
        } else if (object instanceof network.data.respone.OgolnaWiadomosc) {
        } else if (object instanceof network.data.respone.Ranking) {
        } else if (object instanceof network.data.respone.Rejestrowanie) {
        } else if (object instanceof network.data.respone.StartowanieGry) {
        } else if (object instanceof network.data.respone.StatusPokoju) {
        } else if (object instanceof network.data.respone.TworzenieNowejGry) {
        } else if (object instanceof network.data.respone.WysylanieWiadomosci) {
        } else if (object instanceof network.data.respone.Zalogowanie) {
            network.data.respone.Zalogowanie res = (network.data.respone.Zalogowanie) object;
            if (res.getResult()) {
            }
        } else if (object instanceof network.data.respone.ZmianaSlotu) {
        } else if (object instanceof network.data.respone.ZmuszenieStartu) {
        } else if (object instanceof network.data.respone.StatystykaGracza) {
            network.data.respone.StatystykaGracza res = (network.data.respone.StatystykaGracza) object;
        }

    }
}
